@tool
extends EditorInspectorPlugin

const TagRowEditor = preload("res://addons/gameplay-ability-system/Scripts/Inspector/Tag/tag_row_editor.gd")

func _can_handle(object: Object) -> bool:
	return object is Ability

const name_list := [
		"tags_learn_required",
		"tags_activation"
	]

func _parse_property(object: Object, type: Variant.Type, name: String, hint_type: PropertyHint, hint_string: String, usage_flags: int, wide: bool) -> bool:
	
	if type == TYPE_ARRAY and name_list.has(name):
		add_property_editor(name,TagRowEditor.new(name),true)
		return true
	
	return false
